package com.olap.starter.common.vo;

import lombok.extern.slf4j.Slf4j;

import java.util.List;
import java.util.Map;

@Slf4j
/**
 * @author WBG
 * @date 2022/11/14 17:13
 * @describe
 */
public class QueryData {
    private List<?> listData;
    private int count;

    public QueryData(List<?> list, Map<String, Object> map) {
        this.listData = list;
        this.count = Integer.parseInt(map.get("total").toString());
        log.info("<==      list: " + list.size() + "，Total: " + this.count);
    }

    public QueryData(List<List<?>> list) {
        this.listData = list.get(0);
        this.count = Integer.parseInt(list.get(1).get(0).toString());
    }

    public QueryData(List<?> listData, int count) {
        this.listData = listData;
        this.count = count;
    }

    public List<?> getListData() {
        return listData;
    }

    public void setListData(List<?> listData) {
        this.listData = listData;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }
}
